import request from '/@/utils/request';


export function getEmailTmpList(query:Object) {
    return request({
        url: '/api/v1/system/emailtmp/list',
        method: 'get',
        params:query
    })
}


export function getEmailTmp(data:any) {
    return request({
        url: '/api/v1/system/emailtmp/get',
        method: 'get',
        params:data,
    })
}

export function addEmailTmpList(data:any) {
    return request({
        url: '/api/v1/system/emailtmp/add',
        method: 'post',
        data:data,
    })
}

export function editEmailTmpList(data:any) {
    return request({
        url: '/api/v1/system/emailtmp/edit',
        method: 'post',
        data:data,
    })
}

export function settingTmpList(data:any,id:number,title:string) {
    return request({
        url: '/api/v1/system/emailtmp/setting',
        method: 'post',
        data:{id:id,title:title,parameter:data},
    })
}

export function settingTmpListAdd(data:any,id:number,title:string) {
    return request({
        url: '/api/v1/system/emailtmp/setting/add',
        method: 'post',
        data:{id:id,title:title,parameter:data},
    })
}

export function deleteEmailTmp(id:any){
    return request({
        url: '/api/v1/system/emailtmp/delete',
        method: 'delete',
        data:{"id":id},
    })
}

export function openEmailTmp(id:any){
    return request({
        url: '/api/v1/system/emailtmp/open',
        method: 'post',
        data:{"id":id},
    })
}


export function postEmailTest(data:any){
    return request({
        url: '/api/v1/system/emailtmp/test',
        method: 'post',
        data:data,
    })
}